package company.didi_F;

import java.util.Scanner;

public class DI2 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        if (n == 0) {
            System.out.println(" ");
            return;
        }
        if (n == 1) {
            System.out.println(1);
            return;
        }
        int all = n * n;
        long[] dp = new long[all];
        dp[0] = 1;
        dp[1] = 1;
        for (int i = 2; i < all; i++) {
            dp[i] = dp[i - 1] + dp[i - 2];
        }
        long[][] result = new long[n][n];
        int x = 0, y = 0, index = all - 1, movedIndex = 0;
        int[][] moved = new int[][]{{0, 1}, {1, 0}, {0, -1}, {-1, 0}};
        while (index >= 0) {
            result[x][y] = dp[index];
            int tmpX = x + moved[movedIndex][0];
            int tmpY = y + moved[movedIndex][1];
            if (tmpX < 0 || tmpX >= n || tmpY < 0 || tmpY >= n || result[tmpX][tmpY] != 0) {
                movedIndex = (movedIndex + 1) % 4;
                x += moved[movedIndex][0];
                y += moved[movedIndex][1];
            } else {
                x = tmpX;
                y = tmpY;
            }
            index--;
        }
        for (int i = 0; i < n; i++) {
            StringBuffer sb = new StringBuffer();
            for (int j = 0; j < n; j++) {
                sb.append(result[i][j]).append(" ");
            }
            System.out.println(sb);
        }
    }
}
